package com.aizhixin.lab.project.course.repository;

import com.aizhixin.lab.project.course.entity.ProjectPeopleEvaluating;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface ProjectPeopleEvaluatingRepository extends JpaRepository<ProjectPeopleEvaluating,String> {
    Page<ProjectPeopleEvaluating> findByDeleteFlag(Pageable page, Integer deleteFlag);
    ProjectPeopleEvaluating findByProjectId(String project);
    void deleteByProjectId(String projectId);
    void deleteByReleaseProjectReplyId(String releaseProjectReplyId);
    void deleteByCreatedBy(Long CreatedBy);
    List<ProjectPeopleEvaluating> findByProjectIdAndDeleteFlag(String project, Integer deleteFlag);

    List<ProjectPeopleEvaluating> findByReleaseProjectReplyIdAndDeleteFlag(String releaseProjectReplyId,Integer deleteFlag);
    List<ProjectPeopleEvaluating> findByProjectIdAndDeleteFlagAndType(String project, Integer deleteFlag,Integer type);
    List<ProjectPeopleEvaluating> findByReleaseProjectReplyIdAndDeleteFlagAndType(String project, Integer deleteFlag,Integer type);
    List<ProjectPeopleEvaluating> findByProjectIdAndDeleteFlagAndCreatedByAndType(String project, Integer deleteFlag,Long userId,Integer type);

}
